home
***
CD-ROM
|
disk
|
other
***
search
/
SGI Hot Mix 11
/
Hot Mix 11.iso
/
.all
/
bin
/
check4netscape.csh
(
.txt
)
< prev
next >
Wrap
Linux/UNIX/POSIX Shell Script
|
1995-06-22
|
4KB
|
116 lines
#!/bin/csh -f
#
#
# NS_STATUS 1 = same version found
# NS_STATUS 2 = older version found
# NS_STATUS 3 = newer version found
# NS_STATUS 4 = use CD version (default)
#
set NS_STATUS=0
if (`echo $cwd:t` == 'netscape') then
cd ..
set loc=`which netscape`
cd ./netscape
else
set loc=`which netscape`
endif
set no_loc=`echo $loc | /usr/bin/awk '{print $2}' | grep not`
if ($OSVER < 53) then
###############################################################
echo "Checking for Netscape 1.0S for the 5.2 OS...." >> $HM10LOG
###############################################################
# Check to see if Netscape Communications version of the Navigator is installed
if ( `versions Netscape Mozilla | grep Communications | wc -l` > 0 ) then
echo "Found Netscape Communications Netscape Navigator, checking version..." >> $HM10LOG
if ( `versions -n Netscape Mozilla | awk '{print$3}' | tail -1` < 943499999 ) then
echo "You have an older version of the Netscape Navigator installed." >> $HM10LOG
set NS_STATUS=2
else
echo "You appear have a newer version of Netscape Navigator." >> $HM10LOG
set NS_STATUS=3
endif
else
if ( $no_loc == 'not' ) then
echo "It appears that you do not have any versions of netscape installed" >> $HM10LOG
set NS_STATUS=4
else
if ( $no_loc == 'not' && $loc == '/usr/sbin/netscape' ) then
echo "You have an older version of Netscape Navigator installed." >> $HM10LOG
set NS_STATUS=2
else
set VERSION_NUM = `versions -n netscape | awk '{print$3}' | tail -1`
# echo "Netscape Navigator VERSION_NUM=$VERSION_NUM"
if ( $loc == '/usr/bin/X11/netscape' ) then
if ( $VERSION_NUM == 1011009700 ) then
echo "It appears that you have the SAME version of Netscape Navigator 1.0S." >> $HM10LOG
set NS_STATUS=1
else
if ( $VERSION_NUM < 1011009700 ) then
echo "It appears that you have an older version of Netscape Navigator 1.0S." >> $HM10LOG
set NS_STATUS=2
endif
endif
endif
endif
endif
endif
else
###############################################################
echo "Checking for Netscape 1.0S for the 5.3 OS...." >> $HM10LOG
###############################################################
# Check to see if Netscape Communications version of the Navigator is installed
if ( `versions Netscape Mozilla | grep Communications | wc -l` > 0 ) then
echo "Found Netscape Communications Netscape Navigator, checking version..." >> $HM10LOG
if ( `versions -bn Netscape Mozilla | awk '{print$3}' | tail -1` < 943499999 ) then
echo "You have an older version of the Netscape Navigator installed." >> $HM10LOG
set NS_STATUS=2
else
echo "You appear have a newer version of Netscape Navigator." >> $HM10LOG
set NS_STATUS=3
endif
else
if ( $no_loc == 'not') then
echo "It appears that you do not have any versions of netscape installed" >> $HM10LOG
set NS_STATUS=4
else
if ( $no_loc != 'not' && $loc == '/usr/sbin/netscape' ) then
echo "You have an older version of Netscape Navigator installed." >> $HM10LOG
set NS_STATUS=2
else
set VERSION_NUM = `versions -bn netscape | awk '{print$3}' | tail -1`
# echo "Netscape Navigator VERSION_NUM=$VERSION_NUM" >> $HM10LOG
if ( $loc == '/usr/bin/X11/netscape' ) then
if ( $VERSION_NUM < 1021929620 ) then
echo "It appears that you have an older version of Netscape Navigator 1.0S." >> $HM10LOG
set NS_STATUS=2
else
if ( $VERSION_NUM == 1021929620 ) then
echo "It appears that you have the SAME version of Netscape Navigator 1.0S." >> $HM10LOG
set NS_STATUS=1
else
echo "It appears that you have the Newer version of Netscape Navigator 1.0S." >> $HM10LOG
set NS_STATUS=3
endif
endif
endif
endif
endif
endif
###############################################################
endif
exit $NS_STATUS